<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>这是一个网页</h1>
    <button>发送数据到rn</button>
    <script>
        document.querySelector('button').addEventListener('click',()=>{
            alert('hello')
            //所有嵌入到webview的网页，都会在window对象上挂载一个rnwebview的对象
            window.ReactNativeWebView.postMessage('我是闫安')
        })
    </script>
</body>
</html>